.\"
.\" Sun Microsystems, Inc. gratefully acknowledges The Open Group for
.\" permission to reproduce portions of its copyrighted documentation.
.\" Original documentation from The Open Group can be obtained online at
.\" http://www.opengroup.org/bookstore/.
.\"
.\" The Institute of Electrical and Electronics Engineers and The Open
.\" Group, have given us permission to reprint portions of their
.\" documentation.
.\"
.\" In the following statement, the phrase ``this text'' refers to portions
.\" of the system documentation.
.\"
.\" Portions of this text are reprinted and reproduced in electronic form
.\" in the SunOS Reference Manual, from IEEE Std 1003.1, 2004 Edition,
.\" Standard for Information Technology -- Portable Operating System
.\" Interface (POSIX), The Open Group Base Specifications Issue 6,
.\" Copyright (C) 2001-2004 by the Institute of Electrical and Electronics
.\" Engineers, Inc and The Open Group.  In the event of any discrepancy
.\" between these versions and the original IEEE and The Open Group
.\" Standard, the original IEEE and The Open Group Standard is the referee
.\" document.  The original Standard can be obtained online at
.\" http://www.opengroup.org/unix/online.html.
.\"
.\" This notice shall appear on any product containing this material.
.\"
.\" The contents of this file are subject to the terms of the
.\" Common Development and Distribution License (the "License").
.\" You may not use this file except in compliance with the License.
.\"
.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
.\" or http://www.opensolaris.org/os/licensing.
.\" See the License for the specific language governing permissions
.\" and limitations under the License.
.\"
.\" When distributing Covered Code, include this CDDL HEADER in each
.\" file and include the License file at usr/src/OPENSOLARIS.LICENSE.
.\" If applicable, add the following below this CDDL HEADER, with the
.\" fields enclosed by brackets "[]" replaced with your own identifying
.\" information: Portions Copyright [yyyy] [name of copyright owner]
.\"
.\"
.\" Copyright (c) 2001, The IEEE and The Open Group.  All Rights Reserved.
.\" Portions Copyright (c) 2004, Sun Microsystems, Inc. All Rights Reserved.
.\"
.TH TAR.H 3HEAD "Mar 14, 2006"
.SH NAME
tar.h, tar \- extended tar definitions
.SH SYNOPSIS
.LP
.nf
#include <\fBtar.h\fR>
.fi

.SH DESCRIPTION
.sp
.LP
The <\fBtar.h\fR> header defines header block definitions as follows.
.sp
.LP
General definitions:
.sp

.sp
.TS
c c c
l l l .
Name	Value	Description
_
\fBTMAGIC\fR	"ustar"	ustar plus null byte
\fBTMAGLEN\fR	6	length of the above
\fBTVERSION\fR	"00"	00 without a null byte
\fBTVERSLEN\fR	2	length of the above
.TE

.sp
.LP
\fBTypeflag\fR field definitions:
.sp

.sp
.TS
c c c
l l l .
Name	Value	Description
_
\fBREGTYPE\fR	\&'0'	regular file
\fBAREGTYPE\fR	\&'\e0'	regular file
\fBLNKTYPE\fR	\&'1'	link
\fBSYMTYPE\fR	\&'2'	symbolic link
\fBCHRTYPE\fR	\&'3'	character special
\fBBLKTYPE\fR	\&'4'	block special
\fBDIRTYPE\fR	\&'5'	directory
\fBFIFOTYPE\fR	\&'6'	FIFO special
\fBCONTTYPE\fR	\&'7'	reserved
.TE

.sp
.LP
\fBMode\fR field bit definitions (octal):
.sp

.sp
.TS
c c c
l l l .
Name	Value	Description
_
\fBTSUID\fR	04000	set UID on execution
\fBTSGID\fR	02000	set GID on execution
\fBTSVTX\fR	01000	on directories, restricted deletion flag
\fBTUREAD\fR	00400	read by owner
\fBTUWRITE\fR	00200	write by owner special
\fBTUEXEC\fR	00100	execute/search by owner
\fBTGREAD\fR	00040	read by group
\fBTGWRITE\fR	00020	write by group
\fBTGEXEC\fR	00010	execute/search by group
\fBTOREAD\fR	00004	read by other
\fBTOWRITE\fR	00002	write by other
\fBTOEXEC\fR	00001	execute/search by other
.TE

.sp
.LP
Types used in ancillary files:
.sp

.sp
.TS
c c c
l l l .
Name	Value	Description
\fBACL_HDR\fR	\&'A'	Access Control List
\fBLBL_TYPE\fR	\&'L'	Trusted Extensions file label
\fBDIR_TYPE\fR	\&'D'	Trusted Extensions directory label
.TE

.sp
.LP
Attribute types used in Trusted Solaris ancillary files that are interpreted by
Trusted Extensions for backward compatibility:
.sp

.sp
.TS
c c c
l l l .
Name	Value	Description
\fBSLD_TYPE\fR	\&'S'	Single-level directory component
\fBPATH_TYPE\fR	\&'P'	Path component
\fBMLD_TYPE\fR	\&'M'	Multi-level directory component
\fBFILE_TYPE\fR	\&'F'	Must handle files differently
\fBAPRIV_TYPE\fR	\&'P'	Allowed privileges data type in file
\fBFPRIV_TYPE\fR	\&'p'	Forced privileges data type in file
\fBCOMP_TYPE\fR	\&'C'	Path components, use for MLD
\fBATTR_FLAG_TYPE\fR	\&'F'	File attribute flag bytes data type
\fBLK_COMP_TYPE\fR	\&'K'	Link data path component
.TE

.SH ATTRIBUTES
.sp
.LP
See \fBattributes\fR(7) for descriptions of the following attributes:
.sp

.sp
.TS
box;
c | c
l | l .
ATTRIBUTE TYPE	ATTRIBUTE VALUE
_
Interface Stability	See below.
.TE

.sp
.LP
The general definitions, the \fBtypeflag\fR field definitions, and the
\fBmode\fR field bit definitions are Standard. The types used in ancillary
files and the attribute types used in Trusted Solaris ancillary files are
Evolving.
.SH SEE ALSO
.sp
.LP
.BR pax (1),
.BR attributes (7),
.BR standards (7)
